<template>
  <div class="generator-wrapper">
    <SearchForm @queryList="handleQueryList" />
    <TableComponent ref="tableRef" style="width: 100%">
      <!-- <el-table-column
        v-for="(column, index) in displayFieldList"
        :key="column.prop"
        :width="column.width"
        :fixed="
          column.key === 'action' || column.dataIndex === 'action'
            ? 'right'
            : false
        "
      >
        <template #header>
          <div @click="handleHeaderCellCLick(index)" style="cursor: pointer">
            {{
              column.key === "action" || column.dataIndex === "action"
                ? "操作"
                : column.title
            }}
          </div>
        </template>
        <template #default="scope">
          <template
            v-if="column.key === 'action' || column.dataIndex === 'action'"
          >
            <a> 编辑 </a>
            <a> 详情 </a>
            <a> 删除 </a>
          </template>
          <template v-if="column.title === '序号'">
            <span>
              {{ scope.$index + 1 }}
            </span>
          </template>
          <template v-else>
            <span>
              {{ scope.row[column.dataIndex] }}
            </span>
          </template>
        </template>
      </el-table-column> -->
    </TableComponent>
  </div>
</template>

<script setup>
import { ref } from "vue";

import SearchForm from "./SearchForm/index.vue";
import TableComponent from "./TableComponent/index.vue";

const tableRef = ref(null);
function handleQueryList(searchForm) {
  tableRef.value.handleQueryList?.(searchForm);
}
</script>

<style lang="less" scoped>
:deep(.ant-table-thead .ant-table-cell) {
  cursor: pointer;
}
.generator-wrapper {
  box-sizing: border-box;
  padding: 15px;
  background: #fff;
  height: 100%;
}
</style>
